#!/bin/bash
#SBATCH --time=720:00:00   # walltime
#SBATCH --ntasks-per-node=24
#SBATCH --nodes=1   # number of nodes
#SBATCH --mem=42G   # memory per node
#SBATCH -J "g16"   # job name
#SBATCH --partition=gauss # do not change
#SBATCH --qos=gauss # do not change

# change to your input- file-name here.
export inputFileName=Please-Fix-Me.com


### Do no change anything bellow ....

# LOAD MODULES, INSERT CODE, AND RUN YOUR PROGRAMS HERE
ulimit -d unlimited
ulimit -s unlimited
ulimit -t unlimited
ulimit -v unlimited

export SLURM_EXPORT_ENV=ALL

cd $SLURM_SUBMIT_DIR

export g16root=/opt/hpc4you/apps/G16_C02_AVX2
source $g16root/g16/bsd/g16.profile

GAUSS_SCRDIR=/tmp/${USER}.$SLURM_JOBID
if [ ! -a $GAUSS_SCRDIR ]; then
   mkdir -p $GAUSS_SCRDIR
fi
export GAUSS_SCRDIR

echo "Starting Gaussian 16 run on: `hostname` at `date`" >> ${SLURM_JOB_ID}.log

g16 ${inputFileName}

echo "Finished Gaussian 16 run on: `hostname` at `date`" >> ${SLURM_JOB_ID}.log
echo $SLURM_JOB_NODELIST >> ${SLURM_JOB_ID}.log

rm -fr $GAUSS_SCRDIR


